com.rscja.custom

## Class M775Authenticate

- java.lang.Object
- - com.rscja.deviceapi.UhfBase
  - - com.rscja.deviceapi.RFIDWithUHFUART
    - - com.rscja.custom.M775Authenticate

- All Implemented Interfaces:
    IM775Authenticate, IHandheldRFID, ISingleAntenna, IUHF, IUHFOfAndroidUart

      public class M775Authenticate
      extends RFIDWithUHFUART
      implements IM775Authenticate

  英频杰特殊标签定制
  Special label customization
  第一步:通过`RFIDWithUHFUART.init(Context context)` 连接读写器。
  Step 1: Connect to the usb of the reader via`RFIDWithUHFUART.init(Context context)`
  第二步： 如果是设置参数，连接成功之后，调用对应的函数设置参数、读写操作。 盘点标签之前先要设置回调函数`setInventoryCallback(IUHFInventoryCallback)`,然后调用盘点函数`RFIDWithUHFUART.startInventoryTag()`开始执行盘点。 注意: 在盘点标签的时候rfid模块只能响应`RFIDWithUHFUART.stopInventory()`函数。
  For parameter setting, after the connection is successful, call the corresponding function to set parameters and read/write operations. Before inventory labels, set the callback function `setInventoryCallback(IUHFInventoryCallback)`, and then call the counting function `RFIDWithUHFUART.startInventoryTag()` to start inventory. *Note: When counting labels, the RFID module can only respond to the `RFIDWithUHFUART.stopInventory()` function
  第三步,在已设置的`setInventoryCallback(IUHFInventoryCallback)`盘点回调接口的callback()函数中处理盘点到的标签数据
  Step 3: Process the inventoried label data in the callback function of the `setInventoryCallback(IUHFInventoryCallback)` callback interface
  第四步：退出app调用 `RFIDWithUHFUART.free()`断开连接，如果断开之前正在盘点，请先停止盘点，在断开连接。
  Step 4: Exit the app and call `RFIDWithUHFUART.free()` to disconnect. If you are taking inventory before disconnecting, please stop the inventory first and then disconnecting.
  Example Usage:
  public class UHFDemo() {
  M775Authenticate rfid = M775Authenticate.getInstance();
  boolean isInventory=false;
  public void uhf(){
  boolean result = rfid.init(context);
  if (!result) {
  //connect fail
  return;
  }
  //connect success
  //configuration parameters
  // rfid.setFrequencyMode(xx);
  // rfid.setPower(30);
  rfid.setInventoryCallback(new M775Authenticate.IUHFInventoryCallback() {
  public void callback(M775Authenticate.AuthenticateInfo authenticateInfo) {
  if (authenticateInfo != null) {
  //Processing tags
  }
  }
  });
  if (rfid.startInventoryTag()) {
  //success
  isInventory=true;
  } else {
  rfid.stopInventory();
  //fail
  }
  //..............
  rfid.stopInventory();
  isInventory=false;
  //.................
  //disconnect uhf
  rfid.free();
  }

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `M775Authenticate.AuthenticateInfo` AuthenticateInfo对象实体(AuthenticateInfo object entity)
    `static interface` | `M775Authenticate.IUHFInventoryCallback` 盘点回调函数（Inventory callback function）

    - ### Nested classes/interfaces inherited from class com.rscja.deviceapi.UhfBase

      `UhfBase.ErrorCode`

  - ### Field Summary

    - ### Fields inherited from interface com.rscja.deviceapi.interfaces.IUHF

      `Bank_EPC, Bank_RESERVED, Bank_TID, Bank_USER, LockBank_ACCESS, LockBank_EPC, LockBank_KILL, LockBank_TID, LockBank_USER, LockMode_LOCK, LockMode_OPEN, LockMode_PLOCK, LockMode_POPEN, UPDATE_UHF`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static M775Authenticate` | `getInstance()` 实例化M775Authenticate对象(Instantiating M775Authenticate Object)
    `void` | `setInventoryCallback(M775Authenticate.IUHFInventoryCallback inventoryCallback)`
    `boolean` | `setInventoryMessageMode()` 设置读取Message模式(Set Read Message Mode)
    `M775Authenticate.AuthenticateInfo` | `UHFAuthenticate()` 认证函数(Authentication function)
    `M775Authenticate.AuthenticateInfo` | `UHFAuthenticate(int filterBank, int filterAddr, int filterDataLen, java.lang.String filterData)` 认证函数(Authentication function)

    - ### Methods inherited from class com.rscja.deviceapi.RFIDWithUHFUART

      `blockWriteData, eraseData, eraseData, factoryReset, free, generateLockCode, getConnectStatus, getCW, getEPCAndTIDUserMode, getErrCode, getFastInventoryMode, getFrequencyMode, getGen2, getHardwareVersion, getPower, getProtocol, getRFLink, getTagLocate, getTemperature, getVersion, init, inventorySingleTag, inventorySingleTag, isInventorying, isPowerOn, killTag, killTag, lockMem, lockMem, readData, readData, readTagFromBuffer, setConnectionStatusCallback, setCW, setDynamicDistance, setEPCAndTIDMode, setEPCAndTIDUserMode, setEPCAndTIDUserMode, setEPCMode, setFastID, setFastInventoryMode, setFilter, setFreHop, setFrequencyMode, setGen2, setInventoryCallback, setOnLowBatteryListener, setPower, setPowerOnBySystem, setProtocol, setRFLink, setTagFocus, setUart, startInventoryTag, startInventoryTag, startLocation, startRadarLocation, stopInventory, stopLocation, stopRadarLocation, uhfBlockPermalock, uhfJump2Boot, uhfJump2Boot, uhfStartUpdate, uhfStopUpdate, uhfUpdating, writeData, writeData, writeDataToEpc, writeDataToEpc`

    - ### Methods inherited from class com.rscja.deviceapi.UhfBase

      `readTcpServiceState`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.rscja.deviceapi.interfaces.IUHFOfAndroidUart

      `getErrCode, getHardwareVersion, isPowerOn, setOnLowBatteryListener, setPowerOnBySystem, setUart`

    - ### Methods inherited from interface com.rscja.deviceapi.interfaces.IUHF

      `blockWriteData, eraseData, eraseData, factoryReset, free, generateLockCode, getConnectStatus, getCW, getEPCAndTIDUserMode, getFastInventoryMode, getFrequencyMode, getGen2, getProtocol, getRFLink, getTemperature, getVersion, init, inventorySingleTag, isInventorying, killTag, killTag, lockMem, lockMem, readData, readData, readTagFromBuffer, setConnectionStatusCallback, setCW, setEPCAndTIDMode, setEPCAndTIDUserMode, setEPCAndTIDUserMode, setEPCMode, setFastID, setFastInventoryMode, setFilter, setFreHop, setFrequencyMode, setGen2, setInventoryCallback, setProtocol, setRFLink, setTagFocus, startInventoryTag, stopInventory, uhfBlockPermalock, uhfJump2Boot, uhfJump2Boot, uhfStartUpdate, uhfStopUpdate, uhfUpdating, writeData, writeData, writeDataToEpc, writeDataToEpc`

- - ### Method Detail

    - #### getInstance

          public static M775Authenticate getInstance()

      实例化M775Authenticate对象(Instantiating M775Authenticate Object)
      Returns:
        如果当前对象不为空则返回当前对象，如果为空则创建一个新的对象(If the current object is not empty, return the current object. If it is empty, create a new object)

    - #### UHFAuthenticate

          public M775Authenticate.AuthenticateInfo UHFAuthenticate(int filterBank,
                                                                   int filterAddr,
                                                                   int filterDataLen,
                                                                   java.lang.String filterData)

      认证函数(Authentication function)
      Specified by:
        `UHFAuthenticate` in interface `IM775Authenticate`
      Parameters:
        `filterBank` - 掩码的数据区(0x00 为 Reserve 0x01 为 EPC，0x02 表示 TID，0x03 表示 USR)
        Masked data area(0x00 represents Reserve 0x01 represents EPC，0x02 represents TID，0x03 represents USR)
        `filterAddr` - 掩码的地址(Mask address)
        `filterDataLen` - 掩码的长度(The length of the mask)
        `filterData` - 掩码数据(Mask data)
      Returns:

    - #### UHFAuthenticate

          public M775Authenticate.AuthenticateInfo UHFAuthenticate()

      认证函数(Authentication function)
      Specified by:
        `UHFAuthenticate` in interface `IM775Authenticate`

    - #### setInventoryCallback

          public void setInventoryCallback(M775Authenticate.IUHFInventoryCallback inventoryCallback)

      Specified by:
        `setInventoryCallback` in interface `IM775Authenticate`
      Parameters:
        `inventoryCallback` - 盘点回调接口(Inventory callback interface)

    - #### setInventoryMessageMode

          public boolean setInventoryMessageMode()

      设置读取Message模式(Set Read Message Mode)
      Specified by:
        `setInventoryMessageMode` in interface `IM775Authenticate`
      Returns:
        true:设置成功 false:设置失败(true means setup success, false means setup failed)